from PyQt4 import QtCore , QtGui
from lib.papyDB import papyDB , tableInfo
from lib.customUI import customUI
from lib.PSSquery import PSSquery

class dataManager_UI( QtGui.QDialog , customUI ):
    def __init__( self , parent=None ): 
        QtGui.QDialog.__init__(self,parent)
        customUI.__init__(self)        
        self.setWindowTitle("DATA Manager")
        self.setObjectName('insertItem')
        self.parent = parent
    
    def createTable(self):
        self.setStyleSheet(self.styleSheet)  
        #header = ['ID', 'Name', 'Status', 'Start Date', 'End Date', 'Type', 'Rigging', 'Texture', 'Final Date', 'Description']
        self.date_table = QtGui.QTableView( self )
        self.date_table.setSizePolicy( self.sizePolicy_exex )
        self.date_table.setMinimumWidth(600)
        self.date_table.setMinimumHeight(400)
        self.date_table.setGridStyle(QtCore.Qt.DashLine)
        self.date_table.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
        self.date_table.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
        self.date_table.setAlternatingRowColors(True)
        self.date_table.setFont( self.mainFont ) 

    def createDelAssetBtn(self):
        self.insertItem_btn = self.btn("Delete Asset")
        self.insertItem_btn.setMinimumHeight(40)
        
    def setting(self):
        self.createTable()
        self.createDelAssetBtn()
        self.setGeometry( QtCore.QRect( 500, 600, 600, 400 ) )        
        self.show()     


class dataManager( QtCore.QAbstractTableModel ):
    def __init__(self):
        super(dataManager, self).__init__()
        self.data = []
#        self.dirty = False
        


        
if __name__ == '__main__':
    import sys    
    app = QtGui.QApplication(sys.argv)
    ui = dataManager_UI()
    ui.setting()
    app.exec_()    